<template>
	<view>
		<!-- 头部 -->
		<view class="margin">
			<view class="flex-cen" style="margin-top:10rpx ; margin-bottom: 16rpx;">
				<u-search style="width: 624rpx;" inputAlign='center' :showAction="false" placeholder="搜索"
					v-model="keyword" :clearabled="true" searchIconColor="#2d81ff" borderColor="#DDDDDD"
					bgColor="#ffffff">
				</u-search>
			</view>
		</view>

		<!-- list -->
		<view class="">
			<view class="item" v-for="item in 5" :key="item"
				style="border-bottom: 1px solid #F0F0F0; padding-bottom: 30rpx;">
				<view class="fa pp10">
					<image src="/static/img/user.png" mode="widthFix" class="wid48 mr15"></image>
					<view class="">
						<view class="f15 fa" style="color: #A2A2A2;">
							<view class="f1">
								<text style="color: #161616;" class="mr20">张三</text> <text class="mr20"> 女</text>
								<text>30岁</text>
							</view>
							<view class="f12">
								17:23
							</view>
						</view>
						<view class="f13 ca2 mt5">
							医生您看看我这病现在是什么情况，有没有好转...
						</view>
						<view class="mt5">
							<view class="" style="background-color: #F5EFEA;color: #FFB444;font-size: 22rpx;width: 90rpx;text-align: center;
							border-radius: 30rpx;">
								咳嗽
							</view>
						</view>
					</view>
				</view>
				<view class="mt10" style="margin-left: 600rpx;">
					<view class="" style="text-align: right; width: 30rpx;">
						<u-button v-if='id==1' text="确认开方" type="primary" size="mini" @click="click">
						</u-button>
						<u-button v-if='id==2' text="慢病处理" type="primary" size="mini" @click="click">
						</u-button>
						<u-button v-if='id==3' text="邀请患者" type="primary" size="mini" @click="click1">
						</u-button>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword: '',
				id: ''
			};
		},
		onLoad(options) {
			console.log(options);
			let {
				id
			} = options
			this.id = id
		},
		methods: {
			click() {
				uni.switchTab({
					url: '/pages/shop/shop'
				})
			},
			click1() {
				uni.switchTab({
					url: '/pages/ask/ask'
				})
			},
		}
	}
</script>

<style lang="scss">
	::v-deep u-search__content {
		position: relative
	}

	::v-deep .u-search__content__icon {
		position: absolute;
		left: 300rpx;
	}
</style>